package Test;

import java.util.*;

public class TestFibber {
	public static Integer runn(int n) {
		int front = 0;
		int tail = 1;
		int result = 0;
		if (n == 0 || n == 1)
			return n;
	
		else {
			for (int i = 1; i < n; i++) {
				result = front + tail;
				front = tail;
				tail = result;
			}
			return result;
		}
	}

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		while(true)
		System.out.println(runn(sc.nextInt()));

	}
}
